home *** CD-ROM | disk | FTP | other *** search
/ Aminet 32 / Aminet 32 (1999)(Schatztruhe)[!][Aug 1999].iso / Aminet / dev / amos / AMOSList-0499.lzh / AMOSLIST / 000092_nobody_Sat Apr 10 20:35:58 1999.msg < prev    next >
Internet Message Format  |  1999-05-01  |  5KB

  1. Received: from onelist.com (pop.onelist.com [209.207.164.209])
  2.     by osf1.gmu.edu (8.8.8/8.8.8) with SMTP id UAA23658
  3.     for <mcox4@osf1.gmu.edu>; Sat, 10 Apr 1999 20:35:57 -0400 (EDT)
  4. Received: (qmail 28387 invoked by alias); 11 Apr 1999 00:03:56 -0000
  5. Received: (qmail 28368 invoked from network); 11 Apr 1999 00:03:55 -0000
  6. Received: from unknown (HELO srv0.space.net.au) (202.168.96.3) by pop.onelist.com with SMTP; 11 Apr 1999 00:03:55 -0000
  7. Received: from ibm-686 (p007.rp7.space.net.au [202.168.100.8]) by srv0.space.net.au (8.9.3/8.9.1) with SMTP id IAA11511 for <amos-list@onelist.com>; Sun, 11 Apr 1999 08:35:50 +0800
  8. Message-ID: <370FEF00.5C78@space.net.au>
  9. Date: Sun, 11 Apr 1999 08:38:24 +0800
  10. From: "Andy H." <geosync@space.net.au>
  11. X-Mailer: Mozilla 3.01Gold (Win95; I)
  12. To: amos-list@onelist.com
  13. References: <yam7769.1140.1199835504@mail.enterprise.net>
  14. Mailing-List: list amos-list@onelist.com; contact amos-list-owner@onelist.com
  15. Delivered-To: mailing list amos-list@onelist.com
  16. Precedence: bulk
  17. List-Unsubscribe: <mailto:amos-list-unsubscribe@ONElist.com>
  18. Reply-to: amos-list@onelist.com
  19. Mime-Version: 1.0
  20. Content-Type: text/plain; charset=us-ascii
  21. Content-Transfer-Encoding: 7bit
  22. Subject: [amos-list] Re: AI programming.
  23. Status: O
  24. X-Status: 
  25.  
  26. From: "Andy H." <geosync@space.net.au>
  27.  
  28. One way to speed up your code instantly is to split up your code so that
  29. it executes over several cycles.
  30. For example...
  31. 1.  First cycle - scan player pos / figure out where player is heading
  32. 2.  Second cycle - do nothing 
  33. 3.  Third cycle - calculate firing / attack positions and execute
  34. 4.  Fourth cycle - do nothing 
  35. 5.  Fifth cycle - finish AI calculation and execute
  36. 6.  Sixth cycle - do nothing.
  37. This will speed up the processing of the game and even though the AI is
  38. running at about 1/6th the speed, because the frame update is so fast,
  39. and the player can only react at a certain speed you will get the
  40. illusion that the computer is reacting every cycle.
  41. You will have to keep missiles moving and enemy moving along their old
  42. paths during the 'do nothing' cycles.
  43. Andy H.
  44.  
  45.  
  46.  
  47.  
  48. > From: Andrew Crowe <andrewcrowe@enterprise.net>
  49. > Hi Everybody,
  50. > >>    Ok, I've managed to get quite a good AI going now. The player runs
  51. > > around
  52. > >> laying bombs and has a weird nervous twitch (!?)
  53. > >
  54. > > Excellent.  As it should be.
  55. >    sorry to dissapoint you but after several fresh attempts I've finally got
  56. > a computer AI thats comparable to a human player. (It can even beat /me/
  57. > sometimes.)
  58. >    The only problem is that they EAT cpu power.
  59. >    I've compiled a timing demo of them, and they do eat a LOT of vbl time:
  60. > With the demo I get      (average update time / peak update time)
  61. >    040/25mhz, 32meg fast (compiled) ->    1.0 / 4.0
  62. >        "           "   (uncompiled) ->    4.0 / 16.0
  63. >    Std A1200, no fast    (compiled) ->    7.3 / 16.0
  64. >    As you can see, thats not very fast is it? (with no cpu players it does
  65. > 2.0/3.0 uncompiled on my 040)
  66. >   Could some more people, preferably with an 000,030 or 060 who wouldn't
  67. > mind running it (or anyone else) then email me. its 190k Lha'd.
  68. >    Also, if anyone wants a go at optimizing it, then I could send the CPU
  69. > players routines. (Don't forget, they wouldn't do squat on there own
  70. > though, and I /can't/ send you the full source can I?) But If you want to
  71. > take a peak at them anyway, again email me about it.
  72. > See ya.
  73. > --
  74. >        Manta Soft  -  Amiga programing & web page designing
  75. >    Http://members.tripod.com/~mantasoft/      ICQ: 21829166
  76. >      Homepage updated 27/3/99 --- New Bomberman clone started
  77. >   - ------------------- Quote of the day: -------------------- -
  78. > I did *not* have a sexual relationship with Monica Lewinsky, but
  79. > I'll admit this, I /did/ splash out on a new dress.
  80. > -- Bill Clinton
  81. > ------------------------------------------------------------------------
  82. > Share the wealth!
  83. > http://www.ONElist.com
  84. > Tell a friend about ONElist's 115,000 free e-mail communities!
  85. > ------------------------------------------------------------------------
  86. > Official AMOS WWW: http://members.xoom.com/AmosFactory/front.html
  87.  
  88. ------------------------------------------------------------------------
  89. Did you know that ONElist hosts some of the largest lists on the Internet?
  90. http://www.ONElist.com
  91. Our scaleable system is the most reliable free e-mail service on the Internet!
  92. ------------------------------------------------------------------------
  93. Official AMOS WWW: http://members.xoom.com/AmosFactory/front.html